﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using AzureDiagMon.Common.Dtos;

namespace AzureDiagMon.Common.Interfaces.Services
{
    public interface IAzureAccessService
    {
        bool ValidateSubscription(string subscriptionId, string key);

        bool ValidateStorageAccount(string name, string key);

        IEnumerable<WadLogEntryTableEntity> FetchWadLogEntries(DateTime startTime, DateTime endTime,
                                                               String deploymentId = null, String roleName = null,
                                                               String roleInstanceId = null);

        IEnumerable<WadLogEntryTableEntity> FetchWadLogEntries(StorageAccountDto storageAccount,
                                                               string lastPartitionKey,
                                                               string lastRowKey,
                                                               int? count = null);

        IEnumerable<WadLogEntryTableEntity> FetchWadLogEntries(StorageAccountDto storageAccount,
                                                               long? fromParitionKey,
                                                               long? toPartitionKey,
                                                               int? count = null);

        IAsyncResult FetchWadLogEntriesAsync(StorageAccountDto storageAccount,
                                             long? fromParitionKey,
                                             long? toPartitionKey,
                                             int? count,
                                             AsyncCallback callback);

    }
}
